﻿
@model ETL.Web.Models.DashboardViewModel
@{
    ViewBag.Title = "Engineer Time Logging";
}
<link rel="stylesheet" type="text/css" href="../../Content/webgrid.css" />

<!--   Ajax - js event functions   -->
<script src="../../Scripts/manageactualresource-events.js" type="text/javascript"></script>
<script src="../../Scripts/manageactualresource-functions.js" type="text/javascript"></script>
<!--   Js event functions   -->

<style type="text/css">
.no-title .ui-dialog-titlebar
{
    display : none;
}
</style>
<script type="text/javascript">
    $(document).ready(function () {
        GetProjectData();
    });
</script>
@if (ViewBag.IsAdminRole == true)
{
<div class="navbar">
  <div class="navbar-inner">
    <ul class="nav">
      <li class="active">@Html.ActionLink("Manage Actual Resource", "Index", "ManageActualResource", null, null)</li>
      <li>@Html.ActionLink("Manage Tasks", "Index", "ManageTask", null, null)</li>
      <li>@Html.ActionLink("Register New Account", "Register", "Account", null, null)</li>
    </ul>
  </div>
</div>
}
@if (ViewBag.IsLeadRole == true)
{
<div class="navbar">
  <div class="navbar-inner">
    <ul class="nav">
      <li>@Html.ActionLink("Manage My Tasks", "Index", "EnTimeLog", null, null)</li>
      <li class="active">@Html.ActionLink("Manage My Team's Tasks", "Index", "ManageActualResource", null, null)</li>
    </ul>
  </div>
</div>
}

<div class="row">
    <div class="span9">
        <div class="row-fluid">
            <div class="span2" style="text-align: left;">
                <label>
                    Project</label></div>
            <div class="span10" style="text-align: left;">
                <div id="ajaxDropDownListProject">
                    <select id="ddlProject" style="width: 580px;">
                        <option value='-1' title='Select a category...'>Select project...</option>
                        @if (Model.ProjectModels != null && Model.ProjectModels.Count() > 0)
                        {
                            foreach (var project in Model.ProjectModels)
                            {
                            <option selected="@project.Selected" value='@project.ProjectId'>@project.DisplayedName</option>
                            }
                        }
                    </select>
                </div>
            </div>
        </div>
        <div class="row-fluid">
            <div class="span2" style="text-align: left;">
                <label>
                    Lead Engineer</label></div>
            <div class="span10" style="text-align: left;">
                <input id="inputEngineer" name="Engineer" type="text" value="" maxlength="200" size="16" />
            </div>
        </div>
    </div>
</div>
<div class="row" style="margin-top: 10px;">
    <div class="span6">
        <fieldset style="height: 100%;width : 460px;">
            <legend>Your Assigned Tasks</legend>
            <div id="ajaxGridTask">
            </div>
        </fieldset>
    </div>

    <div class="span6" style="margin-left: 30px;">
        <fieldset style="height:  100%;width : 460px;">
            <legend>Time Logged</legend>
            <div id="ajaxGridActualResource">
            </div>
        </fieldset>
    </div>
    
</div>


<div id="EditActualResourceDialog" style="background-color : White; display : none"></div>

<div id="LoadingDialog" style="background-color : White; display : none"></div>